var LODOP;
var printBySelfunc = function (company,mdlIdFk,mdlIdFkDesc,woIdFk,prdQty,NWeight,GWeight,boxIdFk,note) {
    LODOP=getLodop();
    LODOP.PRINT_INIT("");
    LODOP.SET_PRINT_MODE("PROGRAM_CONTENT_BYVAR",true);
    LODOP.ADD_PRINT_LINE("14mm","6mm","14mm","146mm",0,1);
    LODOP.ADD_PRINT_RECT("24mm","6mm","140mm","74mm",0,1);
    LODOP.ADD_PRINT_LINE("34mm","6mm","34mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("44mm","6mm","44mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("54mm","6mm","54mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("64mm","6mm","64mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","6mm","74mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("88mm","6mm","88mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("98mm","36mm","24mm","36mm",0,1);
    LODOP.ADD_PRINT_LINE("98mm","106mm","44mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","56mm","64mm","56mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","86mm","64mm","86mm",0,1);
    LODOP.SET_PRINT_STYLE("FontSize",14);
    LODOP.ADD_PRINT_TEXT("8mm","5mm","70mm","10mm",company);
    LODOP.ADD_PRINT_TEXT("8mm","2mm","70mm","10mm","");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",18);
    LODOP.ADD_PRINT_TEXT("16mm","6mm","140mm","10mm","产品标识卡");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("25mm","6mm","30mm","6mm","物料号");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("30mm","6mm","30mm","4mm","(ProductSpec)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("35mm","6mm","30mm","6mm","物料描述");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("40mm","6mm","30mm","4mm","(ProductSpecDesc)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("45mm","6mm","30mm","6.01mm","GVO批次");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("50mm","6mm","30mm","4mm","(WorkOrder)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("55mm","6mm","30mm","6.01mm","数量");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("60mm","6mm","30mm","4mm","(QTY)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("65mm","6mm","30mm","6.01mm","净重");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("70mm","6mm","30mm","4mm","(NetWeight)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("79mm","6mm","30mm","14mm","PPBoxID");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("89mm","6mm","30mm","6.01mm","备注");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("94mm","6mm","30mm","4mm","(ReMark)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("27mm","36mm","110mm","10mm",mdlIdFk);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("37mm","36mm","110mm","10mm",mdlIdFkDesc);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("47mm","36mm","70mm","10mm",woIdFk);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("47mm","106mm","40mm","10mm","QC检验(QC Test)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("57mm","36mm","70mm","10mm",prdQty+"PCS");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("67mm","36mm","20mm","10mm",NWeight+"kg");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("65mm","56mm","30mm","6mm","毛重");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("70mm","56mm","30mm","4mm","(GrossWeight)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("67mm","86mm","20mm","10mm",GWeight+"kg");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_BARCODE("75mm","39mm","70mm","13mm","Code39",boxIdFk);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("91mm","36mm","70mm","10mm",note);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.PREVIEW();

}
var printBtnfunc = function (mdlIdFk,mdlIdFkDesc,woIdFk,prdQty,NWeight,GWeight,boxIdFk) {
    LODOP=getLodop();
    LODOP.PRINT_INIT("");
    //LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4"); //规定纸张大小；使用A4纸。
    LODOP.SET_PRINT_MODE("PROGRAM_CONTENT_BYVAR",true);
    LODOP.ADD_PRINT_LINE("14mm","6mm","14mm","146mm",0,1);
    LODOP.ADD_PRINT_RECT("24mm","6mm","140mm","74mm",0,1);
   /* LODOP.ADD_PRINT_LINE("14mm","6mm","14mm","146mm",0,1);*/
   /* LODOP.ADD_PRINT_LINE("24mm","6mm","24mm","146mm",0,1);*/
    LODOP.ADD_PRINT_LINE("34mm","6mm","34mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("44mm","6mm","44mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("54mm","6mm","54mm","146mm",0,1);
    LODOP.ADD_PRINT_LINE("64mm","6mm","64mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","6mm","74mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("88mm","6mm","88mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("98mm","36mm","24mm","36mm",0,1);
    LODOP.ADD_PRINT_LINE("98mm","106mm","44mm","106mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","56mm","64mm","56mm",0,1);
    LODOP.ADD_PRINT_LINE("74mm","86mm","64mm","86mm",0,1);
    LODOP.SET_PRINT_STYLE("FontSize",14);
//    LODOP.ADD_PRINT_TEXT("8mm","2mm","70mm","10mm","霸州市云谷电子科技有限公司");
    LODOP.ADD_PRINT_TEXT("8mm","5mm","70mm","10mm","昆山国显光电有限公司");
    LODOP.ADD_PRINT_TEXT("8mm","2mm","70mm","10mm","");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",18);
    LODOP.ADD_PRINT_TEXT("16mm","6mm","140mm","10mm","产品标识卡");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    //LODOP.SET_PRINT_STYLE("FontName","宋体");
    LODOP.ADD_PRINT_TEXT("25mm","6mm","30mm","6mm","物料号");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("30mm","6mm","30mm","4mm","(ProductSpec)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("35mm","6mm","30mm","6mm","物料描述");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("40mm","6mm","30mm","4mm","(ProductSpecDesc)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("45mm","6mm","30mm","6.01mm","GVO批次");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("50mm","6mm","30mm","4mm","(WorkOrder)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("55mm","6mm","30mm","6.01mm","数量");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("60mm","6mm","30mm","4mm","(QTY)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("65mm","6mm","30mm","6.01mm","净重");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("70mm","6mm","30mm","4mm","(NetWeight)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("79mm","6mm","30mm","14mm","PPBoxID");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("89mm","6mm","30mm","6.01mm","备注");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("94mm","6mm","30mm","4mm","(ReMark)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("27mm","36mm","110mm","10mm",mdlIdFk);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("37mm","36mm","110mm","10mm",mdlIdFkDesc);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("47mm","36mm","70mm","10mm",woIdFk);
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("47mm","106mm","40mm","10mm","QC检验(QC Test)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("57mm","36mm","70mm","10mm",prdQty+"PCS");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.ADD_PRINT_TEXT("67mm","36mm","20mm","10mm",NWeight+"kg");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_TEXT("65mm","56mm","30mm","6mm","毛重");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",9);
    LODOP.ADD_PRINT_TEXT("70mm","56mm","30mm","4mm","(GrossWeight)");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("67mm","86mm","20mm","10mm",GWeight+"kg");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.SET_PRINT_STYLE("FontSize",12);
    LODOP.ADD_PRINT_BARCODE("75mm","39mm","70mm","13mm","Code39",boxIdFk);
    LODOP.SET_PRINT_STYLE("FontSize",16);
    LODOP.ADD_PRINT_TEXT("91mm","36mm","70mm","10mm","");
    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
    LODOP.PREVIEW();

}